package com.open.cloud.rbac.service.application;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.open.cloud.rbac.entity.application.CoreApplication;
import com.open.cloud.rbac.object.application.CoreApplicationDto;
import com.open.cloud.rbac.object.application.CoreApplicationSelectDto;
import com.open.cloud.rbac.object.application.CoreApplicationSyncDto;

import java.util.List;

/**
 * <p>
 * 系统应用表 服务类
 * </p>
 *
 * @author wangzengzhou01
 * @since 2024-12-23
 */
public interface ICoreApplicationService extends IService<CoreApplication> {

    /**
     * 新增应用
     *
     * @param applicationDto
     * @return
     */
    public JSONObject addApplicationInfo(CoreApplicationDto applicationDto);

    /**
     * 编辑应用
     *
     * @param applicationDto
     * @return
     */
    public JSONObject updateApplicationInfo(CoreApplicationDto applicationDto);

    /**
     * 删除应用
     *
     * @param applicationId
     * @return
     */
    public JSONObject deleteApplicationById(String applicationId);

    /**
     * 分页查询应用
     *
     * @param applicationSelectDto
     * @return
     */
    public IPage<CoreApplication> selectApplicationByPage(CoreApplicationSelectDto applicationSelectDto);


    /**
     * 同步应用接口
     *
     * @param applicationSyncDto
     * @return
     */
    public JSONObject syncAppInterface(CoreApplicationSyncDto applicationSyncDto);

    /**
     * 根据应用名称删除接口
     *
     * @param application
     * @return
     */
    public Integer deleteApiInterfaceByApplication(String application);

    /**
     * 获取应用列表
     *
     * @param appSelectDto
     * @return
     */
    public List<CoreApplication> getApplicationList(CoreApplicationSelectDto appSelectDto);


}
